package com.shangcheng.server.service;

import com.shangcheng.dubbo.api.PmsSkuStockApi;
import com.shangcheng.model.domain.PmsSkuStock;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PmsSkuStockService {
    @DubboReference
    private PmsSkuStockApi skuStockApi;

    public void updateByPid(Integer pid, List<PmsSkuStock> skuStockList) {
        skuStockApi.updateById(pid, skuStockList);
    }

    public List<PmsSkuStock> findByPidOrCode(Integer pid, String keyword) {
        return skuStockApi.findByPidOrCode(pid, keyword);
    }
}
